package com.service;

import com.entity.Bank;
import com.mapper.BankMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("bankServiceImp")
public class BankServiceImp implements BankService {

    @Autowired
    private BankMapper bm;

    @Override
    public int addBank(Bank bank) {
        System.out.println("准备增加");
        return bm.insert(bank);
    }

    @Override
    public int removeMore(Integer[] ids) {
        return bm.deleteMore(ids);
    }

    @Override
    public int removeByPrimaryKey(Integer id) {
        return bm.deleteByPrimaryKey(id);
    }

    @Override
    public List<Bank> findBankList() {
        return bm.selectBankList();
    }

    @Override
    public int getBankCount() {
        return bm.getBankCount();
    }

    @Override
    public int getBankCountByCondition(Map params) {
        return bm.getBankCountByCondition(params);
    }

    @Override
    public List<Bank> findBankListByPage(Integer startIndex, Integer pageSize) {
        return bm.selectBankListByPage(startIndex, pageSize);
    }

    @Override
    public List<Bank> findBankByCondition(Map params) {
        return bm.selectBankByCondition(params);
    }

    @Override
    public int modifytBankById(Bank bank) {
        return bm.updateBankById(bank);
    }

    @Override
    public Bank findByPrimaryKey(Integer id) {
        return bm.selectByPrimaryKey(id);
    }


}
